//Action script File
import flash.xml.XMLDocument;

import mx.rpc.events.ResultEvent;
import mx.rpc.xml.SimpleXMLDecoder;

		
public function xmlDeseralize(event:ResultEvent):Object{
	var list:XMLList = XMLList(event.result);//results come back as xml because it was the only way I could get to work... I know I fail at life.	
	var xmlStr:String = list.toString();//put xml to string
	var xmlDoc:XMLDocument = new XMLDocument(xmlStr);//use legacy xmldoc and xml node to allow simpleDecoder to put the xml into AS objects
	var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
	return decoder.decodeXML(xmlDoc);
}

